package cn.bdqn.dao;

import java.sql.Connection;
import java.sql.SQLException;
import java.util.List;

import cn.bdqn.bean.User;
import cn.bdqn.bean.UserType;

public interface UserDao {
	
	//增加用户
	int addUser(Connection con, User user) throws SQLException;
	//修改用户信息
	int updateUser(Connection con, User user) throws SQLException;
	//删除用户
	int deleteUser(Connection con, User user) throws SQLException;
	//根据用户姓名获取用户列表总记录数
	int getCount(Connection con, User user) throws SQLException;
	//根据用户姓名获取分页列表
	List<User> getList(Connection con, User user,  int pageIndex, int pageSize) throws SQLException;
	//根据id获取相应的详细用户信息
	User getUserById(Connection con, int id) throws SQLException;	
	//获取所有的用户类型
	List<UserType> getUserTypeList(Connection con ) throws SQLException;
	//根据用户名和密码获取user
	User login(Connection con, User user) throws SQLException;
	
}
